<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>盒子模型</title>
  <style>
    .box1 {
      width: 600px;
      height: 400px;
      background-color: pink;
      background-image: url(./images/g1.png);
      /* no-repeat 不平铺 repeat-y */
      background-repeat: no-repeat;
      /* background-size: 水平方向  垂直方向 ; */
      /* background-size: 600px 400px; */
      background-size: cover;
    }

    .box2 {
      width: 400px;
      height: 400px;
      background-color: green;
      background-image: url(./images/logo2.png);
      background-repeat: no-repeat;
      /* 设置背景图片的位置 */
      background-position: right top;
      /* background-position: right bottom; */
      /* background-position: left bottom; */
      /* background-position: center center; */
      /* background-position: 30% 10%; */
      /* background-position: 100px 150px; */
    }
  </style>
</head>

<body>
  <div class="box1">盒子模型1</div>
  <div class="box2">盒子模型2</div>
</body>

</html>